import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      redirect: '/dashboard'
    },
    {
      path: '/',
      component: () => import(/* webpackChunkName: "home" */ '../views/common/Home.vue'),
      meta: { title: '自述文件' },
      children: [
        {
          path: '/dashboard',
          component: () => import(/* webpackChunkName: "dashboard" */ '../views/page/home/Dashboard.vue'),
          meta: { title: '系统首页' }
        },
        // 数据查询
        {
          path: '/DataPage',
          component: () => import(/* webpackChunkName: "DataPage" */ '../views/page/Data/DataPage.vue'),
          meta: { title: '数据查询' }
        },
        {
          path: '/LiveData',
          component: () => import(/* webpackChunkName: "DataDisplay" */ '../views/page/Data/LiveData.vue'),
          meta: { title: '实时数据' }
        },
        {
          path: '/DataDisplay',
          component: () => import(/* webpackChunkName: "DataDisplay" */ '../views/page/Data/DataDisplay.vue'),
          meta: { title: '一次接图数据展示' }
        },
        // 预警/告警管理
        {
          path: '/Warn',
          component: () => import(/* webpackChunkName: "Warn" */ '../views/page/Warn/Warn.vue'),
          meta: { title: '预警/告警管理' }
        },
        {
          path: '/Info',
          component: () => import(/* webpackChunkName: "Info" */ '../views/page/Warn/Info.vue'),
          meta: { title: '预告警统计' }
        },
        {
          path: '/History',
          component: () => import(/* webpackChunkName: "History" */ '../views/page/Warn/History.vue'),
          meta: { title: '预告警历史查询' }
        },
        {
          path: '/Remote',
          component: () => import(/* webpackChunkName: "Remote" */ '../views/page/Warn/Remote.vue'),
          meta: { title: '远程消音查询' }
        },
        // 历史数据分析
        {
          path: '/HSU',
          component: () => import(/* webpackChunkName: "HSU" */ '../views/page/History/index.vue'),
          meta: { title: '历史数据分析' }
        },
        // 设备信息
        {
          path: '/Device',
          component: () => import(/* webpackChunkName: "Device" */ '../views/page/Device/index.vue'),
          meta: { title: '设备信息' }
        },
        // 预案管理
        {
          path: '/Plan',
          component: () => import(/* webpackChunkName: "Plan" */ '../views/page/Plan/index.vue'),
          meta: { title: '预案管理' }
        },
        // 指标设置
        {
          path: '/Indicator',
          component: () => import(/* webpackChunkName: "Indicator" */ '../views/page/Indicator/index.vue'),
          meta: { title: '指标设置' }
        },
        {
          path: '/basicsPage',
          component: () => import(/* webpackChunkName: "basicsPage" */ '../views/page/Indicator/index.vue'),
          meta: { title: '基础指标设置' }
        },
        {
          path: '/basics',
          component: () => import(/* webpackChunkName: "basics" */ '../views/page/Indicator/basics.vue'),
          meta: { title: '基础指标设置' }
        },
        {
          path: '/Config',
          component: () => import(/* webpackChunkName: "Plan" */ '../views/page/Indicator/Config.vue'),
          meta: { title: '监测站点配置' }
        },
        // 用户管理
        {
          path: '/Users',
          component: () => import(/* webpackChunkName: "Users" */ '../views/page/Users/index.vue'),
          meta: { title: '用户管理' }
        },
        // 组件集
        {
          path: '/DOEM',
          component: () => import(/* webpackChunkName: "icon" */ '../views/page/demo/index.vue'),
          meta: { title: '组件DOEM' }
        },
        {
          path: '/icon',
          component: () => import(/* webpackChunkName: "icon" */ '../views/page/demo/Icon.vue'),
          meta: { title: '自定义图标' }
        },
        {
          path: '/table',
          component: () => import(/* webpackChunkName: "table" */ '../views/page/demo/BaseTable.vue'),
          meta: { title: '基础表格' }
        },
        {
          path: '/tabs',
          component: () => import(/* webpackChunkName: "tabs" */ '../views/page/demo/Tabs.vue'),
          meta: { title: 'tab选项卡' }
        },
        {
          path: '/form',
          component: () => import(/* webpackChunkName: "form" */ '../views/page/demo/BaseForm.vue'),
          meta: { title: '基本表单' }
        },
        {
          // 富文本编辑器组件
          path: '/editor',
          component: () => import(/* webpackChunkName: "editor" */ '../views/page/demo/VueEditor.vue'),
          meta: { title: '富文本编辑器' }
        },
        {
          // markdown组件
          path: '/markdown',
          component: () => import(/* webpackChunkName: "markdown" */ '../views/page/demo/Markdown.vue'),
          meta: { title: 'markdown编辑器' }
        },
        {
          // 图片上传组件
          path: '/upload',
          component: () => import(/* webpackChunkName: "upload" */ '../views/page/demo/Upload.vue'),
          meta: { title: '文件上传' }
        },
        {
          // vue-schart组件
          path: '/charts',
          component: () => import(/* webpackChunkName: "chart" */ '../views/page/demo/BaseCharts.vue'),
          meta: { title: 'schart图表' }
        },
        {
          // 拖拽列表组件
          path: '/drag',
          component: () => import(/* webpackChunkName: "drag" */ '../views/page/demo/DragList.vue'),
          meta: { title: '拖拽列表' }
        },
        {
          // 拖拽Dialog组件
          path: '/dialog',
          component: () => import(/* webpackChunkName: "dragdialog" */ '../views/page/demo/DragDialog.vue'),
          meta: { title: '拖拽弹框' }
        },
        {
          // 国际化组件
          path: '/i18n',
          component: () => import(/* webpackChunkName: "i18n" */ '../views/page/demo/I18n.vue'),
          meta: { title: '国际化' }
        },
        {
          // 权限页面
          path: '/permission',
          component: () => import(/* webpackChunkName: "permission" */ '../views/page/demo/Permission.vue'),
          meta: { title: '权限测试', permission: true }
        },
        {
          path: '/404',
          component: () => import(/* webpackChunkName: "404" */ '../views/page/demo/404.vue'),
          meta: { title: '404' }
        },
        {
          path: '/403',
          component: () => import(/* webpackChunkName: "403" */ '../views/page/demo/403.vue'),
          meta: { title: '403' }
        }
      ]
    },
    {
      path: '/login',
      component: () => import(/* webpackChunkName: "login" */ '../views/page/Login/login.vue')
    },
    {
      path: '*',
      redirect: '/404'
    }
  ]
})
